<!DOCTYPE html>

<html lang="en">
<head>
  <meta charset="UTF-8">

  <title>文豆集团-账号设置</title>
  <link rel="stylesheet" type="text/css" href="css/base.css">
  <link rel="stylesheet" type="text/css" href="css/user_setting.css">
  <script type="text/javascript" src="js/jquery_1.8.3.js"></script>
  <meta name='keywords' content='文豆PHP培训,二次开发培训'>
  <meta name='description' content='文豆集团是一家提供互联网服务的高科技集团公司，集策划、设计、前端优化、研发、测试、系统运维、网站推广、运营、团队外包及互联网人才培养为一体的成熟业务体系'>
</head>

<body>
  <div id="content">
    <!-- header start -->

  <?php include 'view/header.php'; ?>
    <!-- header end -->
    <!-- banner start -->

    <div class="banner"><img src="images/banner_01.png" alt=""></div><!-- banner end -->
    <!-- main start -->

    <div class="main">
      <div class="main_nav">
        <a href="">首页</a> &gt; <a href="">用户中心</a> &gt; <a href="">账号设置</a>
      </div>

      <div class="main_content">
        <div class="main_left">
          <p><?php echo $info['user_name']; ?></p>

          <div class="main_left1">
            <a href="user_center.php">基本信息</a>
          </div>

          <div class="main_left2">
            <a href="">账号设置<span>&gt;</span></a>
          </div>

          <div class="main_left3">
            <a href="user_msg.php">客户留言</a>
          </div>

          <div class="main_left4"></div>
        </div>

        <div class="main_right">
          <div class="main_right_top">
            <ul>
              <li id="main_right_msg"><a href="user_center.php">基本信息</a></li>

              <li id="main_right_msg2">账号设置</li>
            </ul>
          </div>
          <form action="" method="post">
          <table>
            <tr>
              <td id="main_right_right">真实姓名:</td>

              <td><input type="text" name="name" value="<?php echo $info['user_first_name']; ?>"></td>
            </tr>

            <tr>
              <td id="main_right_right">性别:</td>

              <td>
                <select name="gender" id="">
                  <option value="<?php echo $info['user_sex']; ?>"><?php if($info['user_sex']==1){echo '男';}else{
                    echo '女';} ?></option>
                  <option value="<?php if ($info['user_sex']==1) {
                    echo '0';
                  }else{echo '1';} ?>"><?php if ($info['user_sex']==1) {
                    echo '女';
                  }else{echo '男';} ?></option>
                </select>
              </td>

            </tr>

            <tr>
              <td id="main_right_right">生日:</td>

              <td>
                <input type="text" value="<?php echo $info['user_birthday']; ?>" name="birthday">
             </td>
            </tr>

            <tr>
              <td id="main_right_right">手机:</td>

              <td><input type="text" name='tel' value="<?php echo $info['user_tel']; ?>"></td>
            </tr>

            <tr>
              <td id="main_right_right">电子邮箱:</td>

              <td><input type="text" name="email" value="<?php echo $info['user_email']; ?>"></td>
            </tr>

            <tr>
              <td id="main_right_right">QQ:</td>

              <td><input type="text" name="qq" value="<?php echo $info['user_qq']; ?>"></td>
            </tr>

            <tr>
              <td id="main_right_right">详细地址:</td>

              <td><!-- <input type="text" name='address' value="<?php echo $info['user_address']; ?>"> -->
              <select name="province" id="province">
                <option value="">请选择</option>
                <?php foreach ($parentid as $key => $value) {?>
                  <option value="<?php echo $value['id']; ?>"><?php echo $value['categoryname']; ?></option>
                <?php } ?>
                
              </select>

              <select name="city" id="city">
                <option value="">请选择</option>
              </select>
              <select name="town" id="town">
                <option value="">请选择</option>
              </select>
              </td>
            </tr>

            <tr>
              <td id="main_right_right"></td>
              <td><input type='submit' value='保存资料' id='sub'></td>
            </tr>
          </table>
          </form>
          <script type="text/javascript">
            $("#province").change(function(){
              var id = $(this).val();
              $.post('check.php',{'districtid':id},function(data){
                $('#city').empty().append('<option value="">请选择</option>');
                $('#town').empty().append('<option value="">请选择</option>');
                for(i in data){
                  $('#city').append("<option value='"+data[i]['id']+"'>"+data[i]['categoryname']+"</option>");
                }
              },'json');
            });
            $("#city").change(function(){
              var id = $(this).val();
              $.post('check.php',{'districtid':id},function(data){
                $('#town').empty().append('<option value="">请选择</option>');
                for(i in data){
                  $('#town').append("<option value='"+data[i]['id']+"'>"+data[i]['categoryname']+"</option>");
                }
              },'json');
            });
          
          </script>
        </div>
      </div>

      <div class="clear"></div>
    </div><!-- main end -->
    <!-- footer start -->
  <?php include 'view/footer.php'; ?>
 <!-- footer end -->
  </div>
</body>
</html>
